#-*- encoding:utf-8 -*-

import datetime
import time


print('date')
today = datetime.date.today()
print(today)
print("year={0},month={1},day={2}".format(today.year,today.month,today.day))

print(today.strftime('%Y-%m-%d %H:%M:%S %f'))
print(today.isoformat())
print(datetime.date.fromtimestamp(time.time()))

print(datetime.date(2011,11,12))

print('='*40)


print('time')
time = datetime.time(11,22,33,44)
print(time)

print(time.strftime('%Y-%m-%d %H:%M:%S %f'))

print('='*40)

print('datetime')
date_time = datetime.datetime.today()
print(date_time)
print(date_time.strftime('%Y-%m-%d %H:%M:%S %f'))

print(date_time.date())
print(date_time.time())

print(date_time.replace(year=2011,month=12,day=13,hour=14,minute=15,second=16,microsecond=17))

date_now = datetime.datetime.now()
print(date_now)

print('='*40)


